﻿@model Silvia.Models.Admin.BaseModel
@{
    Layout = "~/Views/Shared/_Base.cshtml";
}
<head>
    <title>@ViewBag.Title</title>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#layout").ligerLayout({ leftWidth: 200, topHeight: 50, bottomHeight: 30 });
            var height = $(".l-layout-center").height();
            var accordion = $("#accordion").ligerAccordion({ height: height - 24 });

            $(window).resize(function () {
                accordion.setHeight($(".l-layout-center").height() - 24);
            });

            if ($("#accordion>.system_menu_active").index() != 1) {
                $("#accordion>.system_menu_active").prev().click();
            }

            $(".system_link").hover(function () {
                $(this).addClass("system_link_over");
            }, function () {
                $(this).removeClass("system_link_over");
            });
        });

        
    </script>
</head>
<body>
    <div id="layout">
        <div position="top">
            <div class="system_logo">
                @*<img src="../../Content/image/中国南方电网.png" />*@
            </div>
            <div class="system_name">
                <h3>夕薇雅化妆工作室 - 后台管理</h3>
            </div>
            <div class="system_user">
                <span>用户： <a href="#" class="system_link">@Session["Silvia-AdminUser"]</a></span> <span>|</span>
                <a href="/Admin/Logout" class="system_link">退出</a>
            </div>
        </div>
        <div position="left" title="菜单" id="accordion">
              @foreach (var menu in Model.MenuList)
              {
                  if (menu.IsSelect)
                  {
                <div title="@menu.Title" class="system_menu system_menu_active">
                    @if (menu.SubMenu == null)
                    {
                        return;
                    }
                    <ul>
                        @foreach (var subMenu in menu.SubMenu)
                        {
                            if (subMenu.IsSelect)
                            {
                            <a href="@subMenu.Key" id="@subMenu.Key" class="system_link_over">@subMenu.Title</a>
                            }
                            else
                            {
                            <a href="@subMenu.Key" id="@subMenu.Key" class="system_link">@subMenu.Title</a>
                            }
                        }
                    </ul>
                </div>
                  }
                  else
                  {
                <div title="@menu.Title" class="system_menu">
                    @if (menu.SubMenu == null)
                    {
                        return;
                    }
                    <ul>
                        @foreach (var subMenu in menu.SubMenu)
                        {
                            <a href="@subMenu.Key" id="@subMenu.Key" class="system_link">@subMenu.Title</a>
                        }
                    </ul>
                </div>
                  }
              }
            }
        </div>
        @{
            <div position="center" title="@Model.Caption">
                <div class="system_scroll_container">
                @RenderBody()
                </div>
            </div>
            
        }
        <div position="bottom">
            <div class="system_copy_right">
                &copy; 2011 <a href="#" class="system_link">Your Company</a>, All Rights Reserved
                &reg;</div>
            <div class="system_support">
                技术支持：<a href="#" class="system_link">Anson</a></div>
        </div>
    </div>
</body>
<script type="text/javascript">
    jQuery(function ($) {
        $.datepicker.regional['zh-CN'] = {
            clearText: '清除',
            clearStatus: '清除已选日期',
            closeText: '关闭',
            closeStatus: '不改变当前选择',
            prevText: '<上月',
            prevStatus: '显示上月',
            prevBigText: '<<',
            prevBigStatus: '显示上一年',
            nextText: '下月>',
            nextStatus: '显示下月',
            nextBigText: '>>',
            nextBigStatus: '显示下一年',
            currentText: '今天',
            currentStatus: '显示本月',
            monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
            monthNamesShort: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
            monthStatus: '选择月份',
            yearStatus: '选择年份',
            weekHeader: '周',
            weekStatus: '年内周次',
            dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
            dayNamesShort: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
            dayNamesMin: ['日', '一', '二', '三', '四', '五', '六'],
            dayStatus: '设置 DD 为一周起始',
            dateStatus: '选择 m月 d日, DD',
            dateFormat: 'yy-mm-dd',
            firstDay: 1,
            initStatus: '请选择日期',
            isRTL: false
        };
        $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
    });

    $(function () {

        $('#mainmenu').find('> li').hover(function () {
            $(this).find('ul')
		.removeClass('noJS')
		.stop(true, true).slideToggle('fast');
        });

    });
</script>
